Crate stabby_abi

source ·
Expand description

The core of the stabby ABI.

This crate is generally not meant to be used directly, but through the stabby crate.

Re-exports§

Modules§

  • ABI-stable smart pointers and allocated data structures, with support for custom allocators.
  • Helpers to treat ABI-stable types as if they were their unstable equivalents.
  • How stabby exposes symbols that must be checked through canaries or reflection before being accessed to prevent UB after linking ABI-incompatible functions.
  • Closures, but ABI-stable
  • ABI-stable compact sum types!
  • Futures, but ABI-stable
  • The heart of stabby: the IStable trait.
  • ABI-stable equivalents of iterators.
  • Extending Non-Zero Types to enable niches for other values than 0.
  • Like core::option::Option, but ABI-stable with niche optimizations! A stable option for when rust’s Option<T> isn’t!
  • How stabby computes and generates padding to shift variants in enums
  • A very simple ABI-stable reflection framework.
  • Like core::result::Result, but ABI-stable with niche optimizations! Stable results!
  • ABI-stable slices. Stable slices!
  • ABI-stable strs. Stable strs!
  • A support module for stabby’s dark magic.
  • Support for vtables for multi-trait objects

Macros§

Structs§

  • A ZST that’s only allowed to exist if its generic parameter is ABI-stable.
  • A stable trait object (or a stable &mut dyn)
  • A stable &'a dyn Traits
  • Used by proc-macros to concatenate fields before wrapping them in a Struct to compute their layout.
  • Emulates a type of size Size and alignment Align.
  • Allows removing the IStable implementation from T if Cond is not also ABI-stable.
  • Lets you tell stabby that T has the same stable layout as As.
  • Used by proc-macros to ensure a list of fields gets the proper end padding.
  • An ABI-stable tuple.

Traits§

  • Provides access to a value as if it were of another type.
  • Indicates that Self can be used as a pointer in dynptrs.
  • Provides Clone support for smart pointers that allow it.
  • Indicates that Self can be used as an unconditionally mutable pointer in dynptrs.
  • Provides drop support in dynptr for pointers that have at least partial ownership of their pointee.
  • Indicates that Self can be used as a conditionally mutable pointer in dynptrs.
  • Used to turn a pointer into a dynamic pointer.
  • Allows casting a dyn A + B into dyn A.

Functions§

  • A no-op that fails to compile if T isn’t proven ABI-stable by stabby.

Unions§

Attribute Macros§